package com.example.business.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.business.entity.PersonInfo;
import com.example.business.entity.Result;
import com.example.business.service.IPersonInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 人员基础信息表---PERSON_INFO 前端控制器
 * </p>
 *
 * @author astupidcoder
 * @since 2021-07-23
 */
@RestController
@RequestMapping("/person-info")
public class PersonInfoController {

    @Autowired
    private IPersonInfoService personInfoService;


    @PostMapping(value = "list")
    public JSONObject list () {
        List<PersonInfo> list = personInfoService.list();
        return Result.success(list);
    }

}
